const tablePage = {
  data () {
    return {
      dialog: {
        title: "标题",
        dialogVisible: false,
        width: "50%"
      },
      AEform: {},// 弹框
      multipleSelection: [] //表格被选中的数据
    };
  },
  computed: {

  },
  created () {

  },
  mounted () {

  },
  watch: {

  },
  methods: {
    m_getTableData () { //获取表格数据
      this.fn({
        ...this.searchForm
      }).then(res => {
        this.tableData.list = res.data.list;
        this.tableData.total = res.data.total;
      });
    },
    m_handleFilter () { //按条件搜索事件
      this.searchForm.start = 1
      this.m_getTableData()
    },
    m_handleClear () { // 置空事件
      this.searchForm = {
        pageNum: 1,
        pageSize: 10,
      }
      this.m_getTableData()
    },
    m_indexSort (index) { //索引方法
      return (index + 1) + (this.searchForm.start - 1) * this.searchForm.count
    },
    m_handleSelectionChange (rows) { // 表格复选框
      this.multipleSelection = rows
    },
    m_handleClose () { // dialog关闭
      this.dialog.dialogVisible = false
      this.dialog.title = "标题"
      this.dialog.width = "50%"
      this.AEform = {}
    },
    m_handleUpImg (row) {
      // 上传图片
      this.dialog.dialogVisible = true;
      this.dialog.title = "上传图片";
      this.AEform = row;
    },

  },
  components: {

  },
}

export default tablePage
